// Tencent is pleased to support the open source community by making embedx
// available.
//
// Copyright (C) 2021 THL A29 Limited, a Tencent company.  All rights reserved.
//
// Licensed under the BSD 3-Clause License and other third-party components,
// please refer to LICENSE for details.
//
// Author: Yuanhang Zou (yuanhang.nju@gmail.com)
//

#pragma once
#include <memory>  // std::unique_ptr
#include <vector>

#include "src/common/data_types.h"
#include "src/sampler/random_walker_data_types.h"
#include "src/sampler/sampler_builder.h"

namespace embedx {

class RandomWalkerImpl;

class RandomWalker {
 private:
  std::unique_ptr<RandomWalkerImpl> impl_;

 public:
  explicit RandomWalker(std::unique_ptr<RandomWalkerImpl>&& impl);
  ~RandomWalker();

 public:
  void Traverse(const vec_int_t& cur_nodes, const std::vector<int>& walk_lens,
                const WalkerInfo& walker_info, std::vector<vec_int_t>* seqs,
                PrevInfo* prev_info) const;
};

enum class RandomWalkerEnum : int { STATIC = 0 };

std::unique_ptr<RandomWalker> NewRandomWalker(
    const SamplerBuilder* sampler_builder, RandomWalkerEnum type);

}  // namespace embedx
